<include file="Public/header"/>
<div class="row">
    <div class="wrapper wrapper-content animated">
        <div class="ibox-content">
            <div class="deal-bd order-bottom">资金变动管理</div>
            <form class="layui-form" action="" method="get" autocomplete="off" id="orderform">
                <input type="hidden" name="m" value="User">
                <input type="hidden" name="c" value="Account">
                <input type="hidden" name="a" value="changeRecord">
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <input type="text" name="orderid" autocomplete="off" placeholder="请输入订单号"
                               class="layui-input" value="<{$_GET['orderid']}>">
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="createtime" id="createtime"
                               placeholder="起始时间" value="<{$_GET['createtime']|urldecode}>">
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline" style="width:200px;">
                        <select name="tongdao">
                            <option value="">全部通道</option>
                            <volist name="products" id="vo">
                                <option <if condition="$_GET[tongdao] eq $vo[id]">selected</if>
                                value="<{$vo.id}>"><{$vo.name}></option>
                            </volist>
                        </select>
                    </div>
                    <div class="layui-input-inline" style="width:200px;">
                        <select name="bank">
                            <option value="">全部类型</option>
                            <option <if condition="$_GET[bank] eq 1">selected</if> value="1">付款</option>
                            <option <if condition="$_GET[bank] eq 3">selected</if> value="3">手动增加</option>
                            <option <if condition="$_GET[bank] eq 4">selected</if> value="4">手动减少</option>
                            <option <if condition="$_GET[bank] eq 6">selected</if> value="6">结算</option>
                            <option <if condition="$_GET[bank] eq 7">selected</if> value="7">冻结</option>
                            <option <if condition="$_GET[bank] eq 8">selected</if> value="8">解冻</option>
                            <option <if condition="$_GET[bank] eq 9">selected</if> value="9">提成</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <button type="submit" class="layui-btn layui-bg-blue"><span
                            class="glyphicon glyphicon-search"></span> 搜索
                    </button>
                    <a href="javascript:;" id="export" class="layui-btn layui-bg-green"><span class="glyphicon glyphicon-export"></span> 导出数据</a>
                </div>
            </form>

        </div>
        <div class="tablediv">
            <table class="table table-hover choosetable">
                <thead>
                <tr>
                    <th></th>
                    <th>订单号</th>
                    <th>用户名</th>
                    <th>类型</th>
                    <th>变动前</th>
                    <th>变动金额</th>
                    <th>变动后</th>
                    <th>变动时间</th>
                    <th>备注</th>

                </tr>
                </thead>
                <tbody>
                <volist name="list" id="vo">
                    <tr>
                        <td><{$vo.id}></td>
                        <td style="text-align:center;"><{$vo.transid}></td>
                        <td style="text-align:center; color:#090;">
                            <{$vo["userid"]|getParentName=###,1}>
                        </td>
                        <td style="text-align:center;">
                            <switch name="vo.lx">
                                <case value="1">付款</case>
                                <case value="3">手动增加</case>
                                <case value="4">手动减少</case>
                                <case value="6">结算</case>
                                <case value="7">冻结</case>
                                <case value="8">解冻</case>
                                <case value="9">提成</case>
                                <default />未知
                            </switch>
                        </td>
                        <td style="color:#666"><{$vo.ymoney}></td>
                        <td>
                            <if condition="$vo.money lt 0">
                                    <span style="color:#F00">
                                <else />
                                    <span style="color:#030">
                            </if>
                            <{$vo.money}>
                            </span>
                        </td>
                        <td style="color:#666"><{$vo.gmoney}></td>
                        <td style="text-align:center;"><{$vo.datetime}></td>
                        <td style="text-align:center;">
                            <if condition="$vo.lx == 1 or $vo.lx == 9">
                                <{:huoquddlx($vo.transid)}>
                                <else />
                                <{$vo['contentstr']}>
                            </if>
                        </td>
                    </tr>
                </volist>
                </tbody>
            </table>
            <div class="pagex"> <{$page}></div>
        </div>
        <div class="footer">
            <div class="pull-right">&copy; 2017 <a href="http://www.zhiyu.cc/" target="_blank">支付系统</a> (版本:5.0) All Rights Reserved.</div>
        </div>
    </div>
</div>
<include file="Public/footer"/>
<script>
    layui.use(['laydate', 'laypage', 'layer', 'table', 'form'], function() {
        var laydate = layui.laydate //日期
            , laypage = layui.laypage //分页
            ,layer = layui.layer //弹层
            ,form = layui.form //表单
            , table = layui.table; //表格
        //日期时间范围
        laydate.render({
            elem: '#createtime'
            , type: 'datetime'
            ,theme: 'molv'
            , range: '|'
        });
    });
    $('#export').on('click',function(){
        window.location.href
            ="<{:U('User/Account/exceldownload',array('orderid'=>$_GET[orderid],'createtime'=>$_GET[createtime],'tongdao'=>$_GET[tongdao],'bank'=>$_GET[bank]))}>";
    });
</script>
</body>
</html>